using System;

namespace Atomic.Libraries.Jobs
{
	[Serializable]
	public class NodesOption : IJobSubmitOption
	{
		private int nodes, processorsPerNode;

		public NodesOption(int nodes)
			: this(nodes, 1)
		{
		}

		public NodesOption(int nodes, int processorsPerNode)
		{
			if (nodes < 1 || processorsPerNode < 1)
			{
				throw new ArgumentOutOfRangeException();
			}

			this.nodes = nodes;
			this.processorsPerNode = processorsPerNode;
		}

		public int Nodes
		{
			get
			{
				return nodes;
			}
		}

		public int ProcessorsPerNode
		{
			get
			{
				return processorsPerNode;
			}
		}
	}
}
